Skip to content

Conversation

@saurabh-nxp
Copy link
Contributor

@saurabh-nxp saurabh-nxp commented Apr 22, 2021

Driver APIs are tested using sample applications:

  • samples/drivers/flash_shell
  • samples/subsys/fs/littlefs

These changes have dependency on PR #34086. So that MPU is setup to allow execution of driver code relocated to SRAM.

@github-actions
Copy link

Unit Test Results

     10 files    41 suites   12m 29s ⏱️
1 279 tests 394 ✔️ 624 💤 261 ❌

For more details on these failures, see this check.

Results for commit df354337.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this LUT be used for other octal flashes or is it specific to MX25UM51345G?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is specific to MX25UM51345G. JEDEC standard is not valid for octal mode.

Copy link
Contributor Author

@saurabh-nxp saurabh-nxp Apr 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not just memory specific but to do XIP or to trigger a read command sequence from LUT, dummy cycles are required. And dummy cycles required varies as per frequency at which flash is operated (memory model's data sheet). So along with memory model LUT is also platform/board specific.

@MaureenHelm MaureenHelm requested a review from pdgendt April 23, 2021 00:37
@MaureenHelm MaureenHelm added this to the v2.6.0 milestone Apr 29, 2021
@mmahadevan108
Copy link
Contributor

Can you take a look at PR #34789 and add a partition section to the dts

@github-actions github-actions bot added the area: Samples Samples label May 5, 2021
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit can be squashed with the earlier one that changes board dts file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After adding storage_partition to dts still facing an issue to get littlefs running. If able to get it to work will squash commits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The sample is failing because flash_area is trying to use the flexspi device with the flash API, when it should use the mx25um51345g device instead. You can fix this by moving the partitions section inside the mx25um51345g node.

Area 0 at 0x3f00000 on MX25UM51345G for 1048576 bytes
/lfs mount: 0
/lfs: bsize = 16 ; frsize = 4096 ; blocks = 256 ; bfree = 254
/lfs/boot_count stat: 0
        fn 'boot_count' siz 4
/lfs/boot_count read count 1: 4
/lfs/boot_count seek start: 0
/lfs/boot_count write new boot count 2: 4
/lfs/boot_count close: 0
/lfs opendir: 0
  F 4 boot_count
End of files
/lfs unmount: 0
[00:16:13.131,023] <inf> littlefs: LittleFS version 2.2, disk version 2.0
[00:16:13.133,602] <inf> littlefs: FS at MX25UM51345G:0x3f00000 is 256 0x1000-byte blocks with 512 e
[00:16:13.133,605] <inf> littlefs: sizes: rd 16 ; pr 16 ; ca 64 ; la 32
[00:16:13.133,876] <inf> littlefs: /lfs mounted
[00:16:13.161,600] <inf> littlefs: /lfs unmounted

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Done.

@github-actions github-actions bot added the area: Devicetree Binding PR modifies or adds a Device Tree binding label May 6, 2021
@saurabh-nxp
Copy link
Contributor Author

saurabh-nxp commented May 6, 2021

I noticed some documentation and code compliance violation in CI workflows. Latest force-push and rebased with master addresses only those.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warnings are treated as errors in CI. This needs to be changed to mx25um51345g@2

mimxrt685_evk_cm33.dts.pre.tmp:370.31-387.4: Warning (spi_bus_reg): /soc/peripheral@50000000/spi@134000/mx25um51345g@0: SPI bus unit address format error, expected "2"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@galak
Copy link
Contributor

galak commented May 7, 2021

Seeing a build failure on samples/boards/stm32/power_mgmt/blinky/sample.boards.stm32.power_mgmt.blinky which I've asked @erwango to look into.

Enable FlexSPI NOR flash driver with XIP build options.
Configure FlexSPI pins, update board documentation.
Add FlexSPI NOR flash dts node for mimxrt685_evk.

Enable flash storage by adding partition to dts file.
Using last 1MB for storage, and reserving 63MB for code.

Signed-off-by: Saurabh Jagdhane <[email protected]>
Move LUT to driver.
Update CMake to include SoC specific driver.
Fix mimxrt685_evk LUT header spacing.

Signed-off-by: Saurabh Jagdhane <[email protected]>
Enable XIP based on SoC specific option.

Signed-off-by: Saurabh Jagdhane <[email protected]>
Add mimxrt685_evk_cm33 board to the platform_allow list
for the littlefs sample application.

Signed-off-by: Saurabh Jagdhane <[email protected]>
@galak galak merged commit d5e0e8b into zephyrproject-rtos:master May 7, 2021
@MaureenHelm MaureenHelm deleted the mimxrt685_FlexSPI_XIP branch May 7, 2021 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants